﻿using QDT.Common;
using QDT.Core.Assignments;
using QDT.Core.Deals;
using QDT.Core.Projects;

namespace QDT.Services.Assignments
{
    public interface IAssignmentService
    {

        /// <summary>
        /// 购买债权转让
        /// </summary>
        Credit Bid(int userid, int assignmentId, decimal money, bool isAuto = false);

        /// <summary>
        /// 创建债权转让项目
        /// </summary>
        Assignment CreateAssignment(Project project, Credit credit, decimal money, double feeRate, double bonusRate, bool isOffline = false);

        /// <summary>
        /// 根据Id获取债权转让项目
        /// </summary>
        Assignment GetAssignmentById(int id);

        /// <summary>
        /// 分页获得债权转让项目
        /// </summary>
        IPagedList<Assignment> GetAssignmentPaged(int? page, int? userId=null, int? status=null, int? creditId=null, int? projectId=null, int pageSize = 5);

        void AssignCancel(Assignment assignment);

        void AssignsCancel();

    }
}
